subroutine output(mx,bl,x,Cu,string,snum,tt)
implicit none
    integer mx,bl,i
    integer snum
    real(8) tt

    real(8) x(-bl:mx+bl)
    real(8) Cu(-bl:mx+bl)

    character(len=snum) string

    open(100,file=string,status='replace')
    write(100,*) 'variables="x","u(x)"'
    do i=0,mx
        write(100,"(2(2xd20.10))") x(i),Cu(i)
        !print *,x(i)
    enddo
    close(100)
end